import {util} from '../util'
import test from '../datas/test'
export const GET = {
  '/mock/test': (req, res) => {
    //    获得参数
    let url = req.url
    let userName = util.getQueryString(url, 'userName')
    console.log('userName', userName)
    let userPassword = util.getQueryString(url, 'userPassword')
    console.log('userPassword', userPassword)
    return {
      type: 'GET',
      status: 200,
      msg: 'ok'
    }
  },
  '/mock/test/sss/demo': (req, res) => {
    //    获得参数
    let url = req.url
    let userName = util.getQueryString(url, 'userName')
    console.log('userName', userName)
    let userPassword = util.getQueryString(url, 'userPassword')
    console.log('userPassword', userPassword)
    // 直接返回json串
    return test
  }
}
